<?php
/**
 * 扩展CInlineAction类，增加两个可调用任意类方法的动作
 */

class MCInlineAction extends CInlineAction
{
	public function runMethod()
	{
		$method=$this->getId();
		$this->getController()->$method();
	}
	
	public function runMethodParams($params)
	{
		$methodName=$this->getId();
		$controller=$this->getController();
		$method=new ReflectionMethod($controller, $methodName);
		if($method->getNumberOfParameters()>0)
			return $this->runWithParamsInternal($controller, $method, $params);
		else
			return $controller->$methodName();
	}

}
